import static org.junit.Assert.*;

import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;


public class PruebaHBase {

	@Test
	public void test() throws IOException {
		Configuration conf = HBaseConfiguration.create();
		HTable hTable = new HTable(conf, "persona");
		Result result = hTable.get(new Get(Bytes.toBytes("45434345")));
		
		byte[] value = result.getValue(Bytes.toBytes("datos"), Bytes.toBytes("nombre"));
		System.out.println(Bytes.toString(value));
		
		hTable.close();
	}

}
